package com.yilin.tms.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yilin.tms.core.entity.system.system.Menu;
import com.yilin.tms.core.entity.system.system.MenuOperate;
import com.yilin.tms.core.entity.user.UserType;
import com.yilin.tms.core.entity.user.grant.GrantRoleMenu;
import com.yilin.tms.core.entity.user.grant.GrantRoleMenuOperate;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface IGrantRoleMenuService extends IService<GrantRoleMenu> {

    List<Menu> getMenuListByUserTypeAndCodes(UserType userType, List<String> grantCodeList);


    Map<String, ArrayList<MenuOperate>> getMenuOperateListByCodes(Map<String, String[]> menuCodeOperateCodes);

    List<Menu> getGrantRoleMenuOperateList(UserType userType, String roleId);

    List<Menu> getGrantRoleMenuList(UserType userType, String roleId);

    Map<String, ArrayList<MenuOperate>> getGrantRoleMenuOperateList(String roleId, String[] menuCodes);

    List<String> getGrantRoleMenuCodeList(String roleId);

    void initGrantRoleMenuList(String roleId, String memberTypeId);

    void updateGrantRoleMenuList(String roleId, Map<String, String[]> authorityMap);

    void removeGrantRoleMenu(String roleId, String menuId);


    void saveRoleMenuOperate(GrantRoleMenuOperate roleMenuOperate);

    List<String> getGrantRoleMenuOperateCodeList(String roleId, String roleMenuCode);

    void removeGrantRoleMenuOperate(String roleId, String roleMenuCode, String grantOperateCode);



}
